/*业务单*/
var basic_index={
	isYwd:true,//区分这个是业务单使用
    template_id:0,
    save_as_new_order:0,
    refreshData:function(){ //让innerHTML获取的内容包含input和select(option)的最新值
        var allInputObject=document.body.getElementsByTagName("input");
        for (i = 0; i < allInputObject.length; i++) {
            if(allInputObject[i].type=="checkbox")  {
                    if (allInputObject[i].checked ) 
                        allInputObject[i].setAttribute("checked","checked"); 
                        else
                        allInputObject[i].removeAttribute("checked");
            } else 	if(allInputObject[i].type=="radio")  {
                    if (allInputObject[i].checked ) 
                        allInputObject[i].setAttribute("checked","checked"); 
                        else
                        allInputObject[i].removeAttribute("checked");
            }else allInputObject[i].setAttribute("value",allInputObject[i].value);
        };
        for (i = 0; i < document.getElementsByTagName("select").length; i++) {
            var sl=document.getElementsByTagName("select")[i];
            for (j = 0; j < sl.options.length; j++) {
            if (sl.options[j].selected) 
                        sl.options[j].setAttribute("selected","selected");
            else sl.options[j]=new Option(sl.options[j].text,sl.options[j].value);
            };
        };
        for (i = 0; i < document.getElementsByTagName("textarea").length; i++) {
            var textareas=document.getElementsByTagName("textarea")[i];
            textareas.innerHTML=$(textareas).val();
        };

    },
    beforeformsubmitAsNewOrder:function(){
    	this.save_as_new_order=1;
    	this.beforeformsubmit();
    	//保存为base64图片内容
        menubuttonIndexTool.saveAsBase64img();
    },
    beforeformsubmit:function(){
      //询问是否保存
        console.info(this.template_id);
        checkFeedTotalHasMaterial();
        $.messager.confirm('提示', '是否保存模版及数据?', function(b){  
              if (b){  
                    basic_index.saveAsTemp();
              } 
        });  
    },
    myformsubmit:function(){
        if(!this.checkmyformsubmit()){
            return;
        };
        $.messager.progress();   
        if(basic_index.save_as_new_order!=1){
        	//保存为base64图片内容
            menubuttonIndexTool.saveAsBase64img();
        }
        $.ajax({
          type: 'POST',
          url: serverUrl+"/createOrderBusiness/saveOrderInfo",
          data: myformUtils.formToArrByAllNames("#myformsubmit","order_"),
          success: function(data){
            $.messager.progress('close');
            if(data.result){
                $.messager.alert('提示','模版订单保存成功!','info');
                if(basic_index.save_as_new_order==0){//提交的时候，保存新订单不触发
                    basic_index.getTempForOrder(basic_index.template_id,$("[name='order_p_order_no']").val());
                }
                if(basic_index.save_as_new_order==1){//保存新模版的时候是否要跳到新订单
                	basic_index.afterSaveAsNewOrder(basic_index.template_id,data.data);
                }
                basic_index.save_as_new_order=0;//重置为不保存新订单
            }else{
                $.messager.alert('提示','模版订单保存失败!'+data.info,'info');
            }
          }
        }); 
    },//保存新模版的时候是否要跳到新订单
    afterSaveAsNewOrder:function(id,order_no){//保存新模版的时候是否要跳到新订单
    	/*$.messager.confirm('提醒', '是否打开新保存的订单?', function(r){
            if (r){
            	basic_index.getTempForOrder(id,order_no);
            }
        });*/
    	basic_index.getTempForOrder(id,order_no);
    },
    checkmyformsubmit:function(){
    	var smallOrderTotal=0
    	//source_factory_colresizeable_for_two??
    	$(".source_factory_colresizeable").find('tr').each(function(){
    		var every_tr_smallOrderTotal=0;
    		$(this).find("[name='order_s_small_order_total']").each(
    				function(){
    					if(every_tr_smallOrderTotal<parseInt($(this).text())){
    						every_tr_smallOrderTotal=parseInt($(this).text());
    					}
    		});
    		smallOrderTotal+=every_tr_smallOrderTotal;
    		}
    	)
        //数据自动赋值
        var order_total=0;
        $("[name='order_s_order_total']").each(function(i,elem){
            order_total+=parseInt($(this).text());
        })
        /*var feed_total=0;
        $("[name='order_s_feed_total']").each(function(i,elem){
        	feed_total+=parseInt($(this).text());
        })
         $('[name="order_p_feed_total"]').val(feed_total);*/
        if($("[name='order_p_created']").val()!=undefined&&$("[name='order_p_created']").val().trim().length<1){
        	$("[name='order_p_created']").val(basicDataFixed.username);
        }
        if($('[name="order_p_order_total"]').length==0){
        	alert("注意:订单总数组件不存在或参数不正确")
        	return false;
        }
        $('[name="order_p_order_total"]').val((order_total>0)?order_total:smallOrderTotal);
        //校验数据
            //订单编号
        if($("[name='order_p_order_no']").length==0||$("[name='order_p_order_no']").val().length<1){
            alert("注意:订单编号组件不存在或参数不正确");
            return false;
        }
        //交货日期大于等于今天
        if($("[name='order_p_delivery_time']").length>0){
        	if(window.location.href.indexOf("order_no")<0){
        		if(!utilcheckDate($("[name='order_p_delivery_time']").val(),utilgetFormatDate("yyyy-MM-dd"))){
            		alert("注意:交货日期大于等于今天:"+utilgetFormatDate("yyyy-MM-dd"));
                    return false;
            	}
        	}
        }else{alert("注意:交货日期组件不存在或参数不正确"); return false;}
        //生产部门组件
        if($("[name='order_p_deptid']").length==0||$("[name='order_p_deptid']").val().length<1){
            alert("注意:生产部门组件不存在或参数不正确");
            return false;
        }
        //require_data_val数据组件必填数据
        /*$("[require_data_val='true']").each(function(){
        	if($(this).val().trim().length<1){
        		$(this).focus();
        		alert("此项须填写");
        		return false;
        	}
        });*/
        /*if($("[name='order_p_delivery_time']").length==0){alert("注意:交货日期组件不存在或参数不正确");return false;};//交货日期
		if($("[name='order_p_product_no']").length==0){alert("注意:工厂型号组件不存在或参数不正确");return false;}//工厂型号
		if($("[name='order_p_version_no']").length==0){alert("注意:客户型号组件不存在或参数不正确");return false;}//客户型号
		if($("[name='order_p_cust_order_no']").length==0){alert("注意:客户型号组件不存在或参数不正确");return false;}//客户订单号
		if($("#ewm_img").length==0){alert("注意:二维码组件不存在或参数不正确");return false;}//二维码
*/        return true;
    },
    destroydialog:function(){
        $('div#easyui_dialog_index').dialog("close");
    },
    getSaveTemplateInfoData:function(){
    	//获取保存模版必要参数
    	//order_s_table_source_arr  table_source_line_total order_s_table_source_arr_str
    	var json={};
    	//判断新旧模版
    		//旧模版
    	if($(".source_factory_comp_father").length>0){
    		var order_s_table_source_arr = tbsourcefactoryEvent.table_source_arr.join(",");
    		json["order_s_table_source_arr"]=order_s_table_source_arr;
    		
    		var str=new Array();
        	$(".source_factory_comp_father").
        		find(".source-factory-comp").not(":first").not(":last").
        		find('[contenteditable="true"]').
        		each(function(index,el){
        			console.info($(this).attr("name"))
        			str[index]=$(this).attr("name");
        		})
        	var order_s_table_source_arr_str="";
        	for(i=0;i<tbsourcefactoryEvent.table_source_arr.length;i++){
        		var length= tbsourcefactoryEvent.table_source_arr[i];
        		var temp="";
    			for(j=0;j<length;j++){
    				temp+="'"+str[j]+"',"
    			}
    			order_s_table_source_arr_str+="["+temp.substring(0,temp.length-1)+"],"
    			str.splice(0,length);
        	}
            json["order_s_table_source_arr_str"]="["+order_s_table_source_arr_str.substring(0,order_s_table_source_arr_str.length-1)+"]";
        	var table_source_line_total = tbsourcefactoryEvent.index_x_no;
        	json["table_source_line_total"]=tbsourcefactoryEvent.index_x_no;
    	}
    		//新模版
    	if($(".source_factory_colresizeable").length>0){
    		var order_s_table_source_arr = tbsourcefactoryColresizeEvent.table_source_arr.join(",");
    		json["order_s_table_source_arr"]=order_s_table_source_arr;
    		
    		var str=$(".source_factory_colresizeable").find("tr").eq(3).find("td:not(:first)").find("div").map(function(){return $(this).attr("name")}).get();
    		var order_s_table_source_arr_str="";
    		
    		for(i=0;i<tbsourcefactoryColresizeEvent.table_source_arr.length;i++){
        		var length= tbsourcefactoryColresizeEvent.table_source_arr[i];
        		var temp="";
    			for(j=0;j<length;j++){
    				temp+="'"+str[j]+"',"
    			}
    			order_s_table_source_arr_str+="["+temp.substring(0,temp.length-1)+"],"
    			str.splice(0,length);
        	}
            json["order_s_table_source_arr_str"]="["+order_s_table_source_arr_str.substring(0,order_s_table_source_arr_str.length-1)+"]";
            var table_source_line_total = tbsourcefactoryColresizeEvent.index_x_no;
        	json["table_source_line_total"]=table_source_line_total;
    	}
    	//source_factory_colresizeable_for_two
    	if($(".source_factory_colresizeable_for_two").length>0){
    		var order_s_table_source_arr = tbsourcefactoryColresizeEventForTwo.table_source_arr.join(",");
    		json["order_s_table_source_arr_for_two"]=order_s_table_source_arr;
    		
    		var str=$(".source_factory_colresizeable_for_two").find("tr").eq(3).find("td:not(:first)").find("div").map(function(){return $(this).attr("name")}).get();
    		var order_s_table_source_arr_str="";
    		
    		for(i=0;i<tbsourcefactoryColresizeEventForTwo.table_source_arr.length;i++){
        		var length= tbsourcefactoryColresizeEventForTwo.table_source_arr[i];
        		var temp="";
    			for(j=0;j<length;j++){
    				temp+="'"+str[j]+"',"
    			}
    			order_s_table_source_arr_str+="["+temp.substring(0,temp.length-1)+"],"
    			str.splice(0,length);
        	}
            json["order_s_table_source_arr_str_for_two"]="["+order_s_table_source_arr_str.substring(0,order_s_table_source_arr_str.length-1)+"]";
            var table_source_line_total = tbsourcefactoryColresizeEventForTwo.index_x_no;
        	json["table_source_line_total_for_two"]=table_source_line_total;
    	}
    	return json;
    },
    saveAsTemp:function(){
        console.info(document.documentElement.outerHTML);
        var html_info = document.documentElement.outerHTML;
        if(window.location.href.indexOf("template.html")>-1){//如果是模版直接提交
        	$.messager.progress();
            basic_index.saveAsTempAjax("sysTempName",html_info);
            return;
        }
        $('div#easyui_dialog_index').dialog({
            modal: true,
            title: '订单模版另存为',
            width: "300",
            height: "200",
            closed: false,
            border:false,
            cache: false,
            content:"<div style='margin-left: 50px;margin-top: 50px;'>模版名:<input id='index_temp_name' class='easyui-textbox' type='text'/></div>",
            onClose : function() {  
               $("div#easyui_dialog_index").dialog('destroy');  
               $("body").append("<div id='easyui_dialog_index'></div>");
            },
            buttons: [{
                text:'保存',
                iconCls:'icon-ok',
                handler:function(){
                    $.messager.progress(); 
                    //ajax保存
                    basic_index.saveAsTempAjax($("#index_temp_name").val(),html_info);
                }
            }]
        });
    },
    saveAsTempAjax:function(temp_name,temp_info){
    	var data = this.getSaveTemplateInfoData();
    	var order_s_table_source_arr= data["order_s_table_source_arr"];
    	var table_source_line_total = data["table_source_line_total"];
        var order_s_table_source_arr_str=data["order_s_table_source_arr_str"];
        var order_s_table_source_arr_for_two= data["order_s_table_source_arr_for_two"];
    	var table_source_line_total_for_two = data["table_source_line_total_for_two"];
        var order_s_table_source_arr_str_for_two=data["order_s_table_source_arr_str_for_two"];
        $.ajax({
          type: 'POST',
          url: serverUrl+"/createOrderBusiness/saveAsOrderTemplate",
          data: {"type":3,"temp_name":temp_name,"temp_info":temp_info.replace('document.write(localStorage.getItem("temp_info_select"))',''),"order_s_table_source_arr":order_s_table_source_arr,"table_source_line_total":table_source_line_total,"order_s_table_source_arr_str":order_s_table_source_arr_str
        	  ,"order_s_table_source_arr_for_two":order_s_table_source_arr_for_two,"table_source_line_total_for_two":table_source_line_total_for_two,"order_s_table_source_arr_str_for_two":order_s_table_source_arr_str_for_two},
          success: function(data){
            $.messager.progress('close');
            if(data.result){
                basic_index.template_id=data.data.id;
                //自动保存数据 除去index.html提交数据
                if(window.location.href.indexOf("index_x_ywd.html")>-1||window.location.href.indexOf("index_x.html")>-1||window.location.href.indexOf("index_y.html")>-1){
                    $.messager.alert('提示','模版保存成功!','info');   
                }else{
                	/*var order_no = getQueryString("order_no");
                    if(order_no){*/
                    	basic_index.myformsubmit();
                    //}
                }
                if(window.location.href.indexOf("template.html")<0){//如果不是模版直接提交
                	$('div#easyui_dialog_index').dialog("close");
                }
            }else{
                $.messager.alert('提示','保存失败!','info');
            }
          }
        }); 
    },
    //模版页面保存模版 模版再编辑功能
    saveAsTempOnly:function(){
        console.info(document.documentElement.outerHTML);
        var html_info = document.documentElement.outerHTML;
        $('div#easyui_dialog_index').dialog({
            modal: true,
            title: '订单模版另存为',
            width: "300",
            height: "200",
            closed: false,
            border:false,
            cache: false,
            content:"<div style='margin-left: 50px;margin-top: 50px;'>模版名:<input id='index_temp_name' class='easyui-textbox' type='text'/></div>",
            onClose : function() {  
               $("div#easyui_dialog_index").dialog('destroy');  
               $("body").append("<div id='easyui_dialog_index'></div>");
            },
            buttons: [{
                text:'保存',
                iconCls:'icon-ok',
                handler:function(){
                    $.messager.progress(); 
                    //ajax保存
                    basic_index.saveAsTempOnlyAjax($("#index_temp_name").val(),html_info);
                }
            }]
        });
    },
    saveAsTempOnlyAjax:function(temp_name,temp_info){
    	var data = this.getSaveTemplateInfoData();
    	var order_s_table_source_arr= data["order_s_table_source_arr"];
    	var table_source_line_total = data["table_source_line_total"];
        var order_s_table_source_arr_str=data["order_s_table_source_arr_str"];
        var order_s_table_source_arr_for_two= data["order_s_table_source_arr_for_two"];
    	var table_source_line_total_for_two = data["table_source_line_total_for_two"];
        var order_s_table_source_arr_str_for_two=data["order_s_table_source_arr_str_for_two"];
        $.ajax({
          type: 'POST',
          url: serverUrl+"/createOrderBusiness/saveAsOrderTemplate",
          data: {"type":3,"temp_name":temp_name,"temp_info":temp_info.replace('document.write(localStorage.getItem("temp_info_select"))',''),"order_s_table_source_arr":order_s_table_source_arr,"table_source_line_total":table_source_line_total,"order_s_table_source_arr_str":order_s_table_source_arr_str
        	  ,"order_s_table_source_arr_for_two":order_s_table_source_arr_for_two,"table_source_line_total_for_two":table_source_line_total_for_two,"order_s_table_source_arr_str_for_two":order_s_table_source_arr_str_for_two},
          success: function(data){
            $.messager.progress('close');
            if(data.result){
                basic_index.template_id=data.data.id;
                //自动保存数据 除去index.html提交数据
                $.messager.alert('提示','模版保存成功!','info');   
                $('div#easyui_dialog_index').dialog("close");
            }else{
                $.messager.alert('提示','保存失败!','info');
            }
          }
        }); 
    },
    selectTemplate:function(){
        $('div#easyui_dialog_index').dialog({
            modal: true,
            title: '模版选择',
            width: "400",
            height: "300",
            closed: false,
            border:false,
            cache: false,
            content:"<iframe frameborder='0' scrolling='no' style='width:99%;height:97%;' src='select_template_ywd.html?type=3'></iframe>",
            onClose : function() {  
               $("div#easyui_dialog_index").dialog('destroy');  
               $("body").append("<div id='easyui_dialog_index'></div>");
            }
        });
    },
    getTemp:function(id){
        $.ajax({
          type: 'POST',
          headers: {
              Accept: "application/json; charset=utf-8"
          },
          url: serverUrl+"/createOrderBusiness/getTemplateById",
          data: {"id":id},
          success: function(data){
            console.info(data);
            if(data.data==null){
            	alert("抱歉,查找不到模版或模版被禁用");
            	return;
            }
            localStorage.setItem("temp_info_select",data.data.temp_info);
            localStorage.setItem("temp_info_table_source_arr",data.data.table_source_arr);
            localStorage.setItem("temp_info_table_source_arr_str",data.data.table_source_arr_str);
            localStorage.setItem("table_source_line_total",data.data.table_source_line_total);
            localStorage.setItem("temp_info_table_source_arr_for_two",data.data.table_source_arr_for_two);
            localStorage.setItem("temp_info_table_source_arr_str_for_two",data.data.table_source_arr_str_for_two);
            localStorage.setItem("table_source_line_total_for_two",data.data.table_source_line_total_for_two);
            localStorage.setItem("template_id",id);
            localStorage.setItem("template_id_old",id);
            localStorage.setItem("template_name_old",data.data.temp_name);
            newWinNoRepeat("./template.html","template");
          }
        }); 
    },
    getTempForOrder:function(id,orderNo){
        //为了编辑、查看、审核订单使用
        $.ajax({
          type: 'POST',
          headers: {
              Accept: "application/json; charset=utf-8"
          },
          url: serverUrl+"/createOrderBusiness/getTemplateById",
          data: {"id":id},
          success: function(data){
            console.info(data);
            localStorage.setItem("temp_info_select",data.data.temp_info);
            localStorage.setItem("temp_info_table_source_arr",data.data.table_source_arr);
            localStorage.setItem("temp_info_table_source_arr_str",data.data.table_source_arr_str);
            localStorage.setItem("table_source_line_total",data.data.table_source_line_total);
            localStorage.setItem("temp_info_table_source_arr_for_two",data.data.table_source_arr_for_two);
            localStorage.setItem("temp_info_table_source_arr_str_for_two",data.data.table_source_arr_str_for_two);
            localStorage.setItem("table_source_line_total_for_two",data.data.table_source_line_total_for_two);
            localStorage.setItem("template_id",id);
            newWinNoRepeat("./template.html?order_no="+orderNo,"template");
          }
        }); 
    },
    lockTemp:function(bool){
        interact('.draggable').draggable("options").enabled=bool;
        interact('.draggable').resizable({edges: {left: bool, right: bool, bottom: bool, top: bool}})
        if(!bool){
        	$(".right").find("p[class='close']").hide();
            $(".right").find("p[class='lt']").hide();
            $(".right").find("p[class='wh']").hide();
        }else{
        	$(".right").find("p[class='close']").show();
        }
    },
    dataBasicSet:function(){
        $('div#easyui_dialog_index').dialog({
            modal: true,
            title: '请选择',
            width: "500",
            height: "400",
            closed: false,
            border:false,
            cache: false,
            content:"<iframe frameborder='0' scrolling='no' style='width:99%;height:97%;' src='data_basic_set_dialog.html'></iframe>",
            onClose : function() {  
               $("div#easyui_dialog_index").dialog('destroy');  
               $("body").append("<div id='easyui_dialog_index'></div>");
            }
        });
    },updateaudit:function(){
    	/*if(table_order_info.order_p_audit==1){
    		alert("当前订单为 审核成功,不可修改订单状态");
    		return;
    	}*/
    	$('div#easyui_dialog_index').dialog({
            modal: true,
            title: '请选择 订单审核状态',
            width: "300",
            height: "200",
            closed: false,
            border:false,
            cache: false,
            content:"" +
            		"<div style='margin-left: 50px;margin-top: 50px;'>" +
            		"审核状态:<select id='select_audit_status'><option value='1'>审核成功</option><option value='-1'>退回</option>" +
            		"<option value='0'>计划</option>" +
            		"</select>" +
            		"</div>",
            onClose : function() {  
               $("div#easyui_dialog_index").dialog('destroy');  
               $("body").append("<div id='easyui_dialog_index'></div>");
            },
            buttons: [{
                text:'保存',
                iconCls:'icon-ok',
                handler:function(){
                    $.messager.progress(); 
                    //ajax保存
                    basic_index.updateauditAjax();
                }
            }]
        });
    },updateauditAjax:function(){
    	var order_p_audit = $("#select_audit_status").val();
    	var order_p_order_no = getQueryString("order_no");
        if(order_p_order_no){
        	$.messager.progress();
            $.ajax({
              type: 'POST',
              url: serverUrl+"/createOrderBusiness/updateAudit",
              data: {"order_p_audit":order_p_audit,"order_p_order_no":order_p_order_no},
              success: function(data){
                $.messager.progress('close');
                if(data.result){
                    $.messager.alert('提示','订单更新成功!','info');
                    basic_index.destroydialog();
                }else{
                    $.messager.alert('提示','订单更新失败!'+data.info,'info');
                }
              }
            });
        }else{
        	alert("错误：获取不到订单编号")
        }
    }
}

//打印
$('#printArea').click(function () {
    /*bdhtml=window.document.body.innerHTML;//获取当前页的html代码    
    sprnstr="<!--startprint-->";//设置打印开始区域    
    eprnstr="<!--endprint-->";//设置打印结束区域  
    prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)); //从开始代码向后取html    
    prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));//从结束代码向前取html    
    window.document.body.innerHTML=prnhtml;    
    window.print(); 
    window.location.reload;*/
	var smallOrderTotal=0
	//order_s_table_source_arr_str_for_two??
	$(".source_factory_colresizeable").find('tr').each(function(){
		var every_tr_smallOrderTotal=0;
		$(this).find("[name='order_s_small_order_total']").each(
				function(){
					if(every_tr_smallOrderTotal<parseInt($(this).text())){
						every_tr_smallOrderTotal=parseInt($(this).text());
					}
		});
		smallOrderTotal+=every_tr_smallOrderTotal;
		}
	)
    //数据自动赋值
    var order_total=0;
    $("[name='order_s_order_total']").each(function(i,elem){
        order_total+=parseInt($(this).text());
    })
    if($("[name='order_p_created']").val()!=undefined&&$("[name='order_p_created']").val().trim().length<1){
    	$("[name='order_p_created']").val(basicDataFixed.username);
    }
    $('[name="order_p_order_total"]').val((order_total>0)?order_total:smallOrderTotal);
    //总投料数
    /*var feed_total=0;
    $("[name='order_s_feed_total']").each(function(i,elem){
    	feed_total+=parseInt($(this).text());
    })
    $('[name="order_p_feed_total"]').val(feed_total)*/
    
    $(".close").hide();
    $(".lt").hide();
    $(".wh").hide();
    //$(".draggable").css({border:"none"});
    basic_index.refreshData();
    table_order_info.reloadQrcode();
    var img = document.getElementById("ewm_img_print"); // get image element
    if(img){
        var canvas  = document.getElementsByTagName("canvas")[0];//document.getElementById("ewm_img"); 
        img.src = canvas.toDataURL();                     // update image
        $("#ewm_img_print").show();
        $("#ewm_img").hide();
    }
    //添加公司信息
    $("#company_msg").remove();
    var company_msg_font_size=($("#jprint_area").attr("print-font")!=undefined)?$("#jprint_area").attr("print-font")+"px":"20px";
    $(".right").before("<div id='company_msg' style='width:100%;text-align:center;font-size:"+company_msg_font_size+";font-weight:bold'>"+basicDataFixed.company+"业务订单</div>")

    $(":button").hide();//按钮隐藏
    //图片信息
    $("#mydropzone_quan").hide();
    $("#mydropzone_tui").hide();
    $(".dz-message").hide();
    
    //可移动table
    $('.JCLRgrips').hide();
    //////////
    $("#jprint_area").jqprint();  
    /////////
    //可移动table 自定义表单
    $('.JCLRgrips').show();
    if($("#mydropzone_quan_value").val()==""||$("#mydropzone_quan_value").val()==null){
		$("#mydropzone_quan").show();
	}
	if($("#mydropzone_tui_value").val()==""||$("#mydropzone_tui_value").val()==null){
		$("#mydropzone_tui").show();
	}
    $(".dz-message").show();
    
    $(":button").show();//按钮显示
    //隐藏公司信息
    $("#company_msg").hide();
    if(interact('.draggable').draggable("options").enabled){
    	$(".close").show();
        $(".lt").show();
        $(".wh").show();
    }
    $(".draggable").css({border:"1px solid black"});
    $("#ewm_img_print").hide();
    $("#ewm_img").show();
});

/*if(window.location.href.indexOf("template.html")>-1){
    basic_index.template_id=localStorage.getItem("template_id");
}*/